<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/webCommon/webCommon.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>用户添加</title>

 <script type="text/javascript" src="plugins/layui/layui.js"></script>
		<script>
			layui.use(['form', 'layedit', 'laydate'], function() {
				var form = layui.form(),
					layer = layui.layer,
					layedit = layui.layedit,
					laydate = layui.laydate;
				//自定义验证规则
				form.verify({
					userNo: function(value) {
							if(value.length <= 0) {
								return '学号不能为空啊';
							}
						},
			    	userPassword: function(value) {
							if(value.length <= 0) {
								return '密码不能为空啊';
							}
						},
					
			    	userName: function(value) {
							if(value.length <= 0) {
								return '姓名不能为空啊';
							}
						},
				
		        	
				});
				 //监听提交
				form.on('submit(tijiao)', function(data) {
					layer.alert(JSON.stringify(data.field), {
						title: '最终的提交信息'
					})
				});
				 
			});
		</script> 


</head>

<body>
	<div style="margin: 15px;">
		 <form class="layui-form" action="<%=path %>/sys/SysUser_add.action">
		 
		 	<div class="layui-form-item">
				<label class="layui-form-label">类型</label>
				<div class="layui-input-block">
					<input type="radio" name="userType" value="0" title="学生" checked="">
					<input type="radio" name="userType" value="1" title="教师"> 
					<!-- <input type="radio" name="sex" value="禁" title="禁用" disabled=""> -->
				</div>
			</div>
		 
			<div class="layui-form-item">
				<label class="layui-form-label">学号</label>
				<div class="layui-input-inline">
					<input type="text" name="userNo" lay-verify="userNo" autocomplete="off" placeholder="这里输入登录账号" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">密码</label>
				<div class="layui-input-inline">
					<input type="password" name="userPassword" lay-verify="userPassword" placeholder="请输入" autocomplete="off" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">姓名</label>
				<div class="layui-input-inline">
					<input type="text" name="userName" lay-verify="userName" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">昵称</label>
				<div class="layui-input-inline">
					<input type="text" name="userNickname" lay-verify="userNickname" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">联系方式</label>
				<div class="layui-input-inline">
					<input type="text" name="userContact" lay-verify="userContact" autocomplete="off" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">性别</label>
				<div class="layui-input-block">
					<input type="radio" name="userSex" value="0" title="男" checked="">
					<input type="radio" name="userSex" value="1" title="女"> 
					<!-- <input type="radio" name="sex" value="禁" title="禁用" disabled=""> -->
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">所属</label>  <!--selectedcollegeId  -->
					<div class="layui-input-inline">
						<select name="collegeId" id="selectedcollegeId" class="college">
							<option value="">请选择学院</option>
							<s:iterator value="sysCollegeAllList">
							<option  class="collegeSelect"  value="${collegeId}" id="${collegeId}">${collegeName}</option>
							</s:iterator> 
						</select>
					</div>
			
					<div class="layui-input-inline">
						<select name="marjorsId" id="selectedmarjorsId">
							<option value="">请选择专业</option>
							 <s:iterator value="sysMarjorsAllList">
								<option class="marjorsSelect" value="${marjorsId}" id="${marjorsId}">${marjorsName}</option>
							</s:iterator> 
						</select>
					</div>
		        
					<div class="layui-input-inline">
						<select name="classId" id="classId">
							<option value="">请选择班级</option>
							<s:iterator value="sysClassAllList">
							<option value="${classId}" id="${classId}">${className}</option>
							</s:iterator>
						</select>
					</div>
		        </div>
		        
			<div class="layui-form-item">
					<label class="layui-form-label">所属分组</label>
					<div class="layui-input-inline">
						<select name="studentGroupId" id="studentGroupId">
							<option value="">请选择分组</option>
							<s:iterator value="serviceStudentGroupAllList">
							<option value="${studentGroupId}" id="${studentGroupId}">${studentGroupName}</option>
							</s:iterator>
						</select>
					</div>
		    </div>
			
                <div class="layui-form-item">
					<div class="layui-input-block">
						<button id="tijiao" class="layui-btn" lay-filter="tijiao" lay-submit="">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
		</form>
	</div>	
</body>
</html>
